<!DOCTYPE html>
<#assign dicSelect = JspTaglibs["http://www.casic304.cn/dicSelect"]/>
<#assign f = JspTaglibs["http://www.casic304.cn/f"] />
<#assign SourceDept = JspTaglibs["http://www.casic304.cn/SourceDept"]/>
<head>
    <meta charset="utf-8">
    <title>跟踪质量问题</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/qbdms.css">
    <script type="text/javascript">
        var __ctx = "${ctx}";
    </script>
</head>
<body>
<div class="">
    <div class="layui-table-view-body">
        <table id="wQbdFalProblemresetTable" lay-filter="wQbdFalProblemresetTable"></table>
    </div>
</div>
<!-- 列表头部工具栏 -->
<script type="text/html" id="wQbdFalProblemresetHeaderToolsBar">
    <div class="ccpui-enterSel">
        <form class="layui-form" action="" lay-filter="wQbdFalProblemresetQueryForm" >
            <div class="layui-form-body selch">
                <div class="table-top-filter layui-row">
                    <div class=" layui-col-md12 layui-col-sm12" >
                        <label class="layui-form-label">质量问题名称</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input filter-value" name="Q_fProblemname_SL" placeholder="请输入"/>
                        </div>
                    </div>
                </div>
                <div class="selchBtn">
                    <a class="layui-btn layui-btn-sm fillBtn" lay-event="query">
                        <span>查询</span>
                    </a>
                    <div class="layui-btn-group">
                        <button type="button" class="layui-btn layui-btn-sm" lay-event="clears" style="width: 28px;font-size: 12px;padding: 0">
                            <i class="iconfont data-iconcommon_refresh"></i>
                        </button>
                    </div>
                </div>
            </div>
        </form >
    </div>

</script>
<!-- 右侧工具栏 -->
<script type="text/html" id="wQbdFalProblemresetRightToolsBar">
    <@f.a alias="xqan_zlwt1,xqan_zlwt2,xqan_zlwt3" css="RightBtn" event="particulars">详情</@f.a>
    <@f.a alias="xqan_zlwt3y" css="RightBtn" event="particularsSanYuan">详情</@f.a>
</script>
<script src="${ctx}/qbdmsStatic/public/configFile.js"></script>
<script src="${ctx}/layui/layui.js"></script>
<script>
    //一般直接写在一个js文件中
    layui.config({
        base: serverPath.qbdmsPath + staticPath.qbdmsPath //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index','table', 'form', 'common','publicMethods','jquery','laydate', 'layer'], function () {
        var table = layui.table;
        var setter = layui.setter;
        var form = layui.form;
        var common = layui.common;
        var $ = layui.jquery;
        var layer = layui.layer;
        var publicMethods = layui.publicMethods;
        var totalFilter = layui.totalFilter;
        common.tableSort('wQbdFalProblemresetTable');

        var tableH = publicMethods.tabHeight();

        var cols = '${cols}';
        //第一个实例
        window.tableInstace = table.render({
            elem: '#wQbdFalProblemresetTable'
            ,height:tableH
            ,url: serverPath.qbdmsPath + '/qbdms/wQbdFalProblemreset/list?fSuperviseid='+ '${did}&mark=track'
            ,page: publicMethods.pageFun() //开启分页
            ,limit: 20
            ,defaultToolbar: ['']
            ,toolbar: '#wQbdFalProblemresetHeaderToolsBar'
            ,method: 'post'
            ,autoSort: false //是否排序
            ,cols: [cols?JSON.parse(cols):[ //表头
                {field: 'sn', type: 'numbers', title: '序号', fixed: 'left'}
                ,{type: 'checkbox', fixed: 'left'}
                ,{field: 'fProblemname', title: '质量问题名称', sortname: 'f_problemname'}
                ,{field: 'fModelsymbol', title: '型号代号', sortname: 'f_modelsymbol'}
                ,{field: 'fModelname', title: '型号名称', sortname: 'f_modelname'}
                ,{
                    fixed: 'right',
                    title: '管理',
                    toolbar: '#wQbdFalProblemresetRightToolsBar'
                }
            ]],done:function () {
                common.tableSelectCon('.ccpui-enterSel .layui-form input','a[lay-event=query]','.ccpui-enterSel');
            }
        });


        function reflashQuery(isClear) {
            common.tableConditionRender("wQbdFalProblemresetTable","wQbdFalProblemresetQueryForm",{where:{}},isClear);
        }


        table.on('toolbar(wQbdFalProblemresetTable)', function (obj) {
            var checkStatus = table.checkStatus(obj.config.id);
            var data = checkStatus.data;
            var _this = this;
            switch (obj.event) {
                case "query":
                    reflashQuery(false);
                    break;
                case "clears":
                    reflashQuery(true);
                    break;
            }
        });

        table.on('tool(wQbdFalProblemresetTable)', function(obj) {
            var data = obj.data, //获得当前行数据
                    layEvent = obj.event; //获得 lay-event 对应的值
            var layerH=publicMethods.layHeight(parent.document.getElementsByClassName('listBody')[0]);
            switch(layEvent){
                case "particulars":
                    parent.layer.open({
                        type: 2,
                        moveOut :true,
                        area: ['80%', layerH],
                        // btn:['关闭'],
                        move:false,
                        title: ['详情'],
                        content: serverPath.qbdmsPath + '/qbdms/wQbdFalProblemreset/view/particulars?id='+data.id+'&mark=db'
                    });
                    break;
                case "particularsSanYuan":
                    parent.layer.open({
                        type: 2,
                        moveOut :true,
                        area: ['80%', layerH],
                        // btn:['关闭'],
                        move:false,
                        title: ['详情'],
                        content: serverPath.qbdmsPath + '/qbdms/wQbdFalProblemreset/view/particularsSanYuan?id='+data.id+'&mark=db'
                    });
                    break;

            }
        });

        window.Initialization = function () {
            
        };
        common.tableSort("wQbdFalProblemresetTable",{show:window.Initialization});

    });
</script>
</body>
</html>